Sequence-to-sequence language grounding of non-Markovian task specifications

ABSTRACT

A method includes enabling a robot to learn a mapping between English language commands and Linear Temporal Logic (LTL) expressions, wherein neural sequence-to-sequence learning models are employed to infer a LTL sequence corresponding to a given natural language command.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims benefit from U.S. Provisional Patent Application Ser. No. 62/660,063, filed Apr. 19, 2018, which is incorporated by reference in its entirety.

STATEMENT REGARDING GOVERNMENT INTEREST

This invention was made with government support under grant number 1637614 awarded by the National Science Foundation, grant numbers W911NF-15-1-0503 awarded by the U.S. Army Research Office, grant number D15AP00102 awarded by the Defense Advanced Research Projects Agency and grant number NNX16AR61G awarded by National Aeronautics and Space Administration. The government has certain rights in the invention.

BACKGROUND OF THE INVENTION

The invention generally relates to robotics, and more specifically to sequence-to-sequence language grounding of non-Markovian task specifications.

In general, the broad spectrum of tasks that humans would like to see interpreted and executed by robots extends beyond realizing a particular goal configuration. A slightly richer space of tasks includes those that are looking to induce a constrained or repetitive robot execution. In the former category, a person may instruct a robot in the home to “go down the right side of the hallway and to the bedroom,” restricting the space of possible paths the robot might take to reach its destination. Similarly, a command in the latter category may be “watch the sink for dirty dishes and clean any that you see,” implying that the robot should enter a loop of repeatedly scanning for dirty dishes and cleaning any that appear. A robot system that can adequately represent and enable untrained users to express these complex behaviors would constitute a huge step forward in the area of human-robot interaction.

Existing approaches such as Linear Temporal Logic (LTL) allow these behaviors to be expressed as formal logical functions, enabling the automatic generation of robot controllers to execute these behaviors. While incredibly powerful, the average, non-expert user cannot be expected to hold the requisite knowledge for expressing arbitrarily complex behaviors via LTL. Consequently, we turn to natural language s a familiar interface through which non-expert users may convey their intent and desires while escaping the need for low-level programming knowledge. Unfortunately, due to the rich underlying semantics of LTL, there is no existing approach that takes open-ended natural language commands and maps directly to general LTL expressions.

SUMMARY OF THE INVENTION

The following presents a simplified summary of the innovation in order to provide a basic understanding of some aspects of the invention. This summary is not an extensive overview of the invention. It is intended to neither identify key or critical elements of the invention nor delineate the scope of the invention. Its sole purpose is to present some concepts of the invention in a simplified form as a prelude to the more detailed description that is presented later.

In general, in one aspect, the invention features a method including enabling a robot to learn a mapping between English language commands and Linear Temporal Logic (LTL) expressions, wherein neural sequence-to-sequence learning models are employed to infer a LTL sequence corresponding to a given natural language command.

These and other features and advantages will be apparent from a reading of the following detailed description and a review of the associated drawings. It is to be understood that both the foregoing general description and the following detailed description are explanatory only and are not restrictive of aspects as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

The patent or application file contains at least one drawing executed in color. Copies of this patent or patent application publication with color drawing(s) will be provided by the Office upon request and payment of the necessary fee.

These and other features, aspects, and advantages of the present invention will become better understood with reference to the following description, appended claims, and accompanying drawings where:

FIG. 1 illustrates sample images provided to Amazon Mechanical Turk (AMT) annotators.

FIG. 2 illustrates examples of natural language commands and their corresponding GLTL.

FIG. 3 illustrates a table of sample language grounding accuracy means and standard deviations.

FIG. 4 illustrates example test results.

DETAILED DESCRIPTION

The subject innovation is now described with reference to the drawings, wherein like reference numerals are used to refer to like elements throughout. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It may be evident, however, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing the present invention.

In general, natural language commands issued to robots not only specify a particular target configuration or goal state but also outline constraints on how the robot goes about its execution. That is, the path taken to achieving some goal state is given equal importance to the goal state itself. One example of this could be instructing a wheeled robot to “go to the living room but avoid the kitchen,” in order to avoid scuffing the floor. This class of behaviors poses a serious obstacle to existing language understanding for robotics approaches that map to either action sequences or goal state representations. Due to the non-Markovian nature of the objective, approaches in the former category must map to potentially unbounded action sequences whereas approaches in the latter category would require folding the entirety of a robot's trajectory into a (traditionally Markovian) state representation, resulting in an intractable decision-making problem. To resolve this challenge, the present invention uses probabilistic variant of Linear Temporal Logic (LTL) as a goal specification language for a Markov Decision Process (MDP). We show that standard neural sequence-to-sequence learning models can successfully ground language to this semantic representation, and also provide analysis that highlights generalization to novel, unseen logical forms as an open problem for this class of model.

The present invention enable a robot to learn a mapping between English commands and LTL expressions and includes a dataset that maps between English and LTL in a model environment. Neural sequence-to-sequence learning models are used to infer the LTL sequence corresponding to a given natural language input sequence.

In order to fully specify our system for converting natural language to robot behavior herein, we begin by describing our problem setting and clarify its connection to the Geometric LTL (GLTL) semantic representation inferred by our grounding model. We then outline the recurrent neural network architectures used for mapping between natural language and GLTL expressions.

We formalize the problem of language grounding within the context of an Object-oriented Markov Decision Process (OO-MDP). A Markov Decision Process (MDP) is a five-tuple (S, A, R, T, γ) where S defines the robot state space, A specifies the actions available to the robot, R encodes the underlying task through numerical rewards defined for each state-action pair, T defines the probabilistic transition dynamics of the environment, and γ is a discount factor. Given an MDP as input, a planning algorithm produces a policy that maps from states to robot actions. Building on the MDP formalism, an OO-MDP refines the notion of state to be a collection of object classes, each with their own set of attributes. Additionally, the OO-MDP framework includes a set of propositional logic functions, parameterized by instances of object classes, that can be used to query objects within the OO-MDP state.

We treat natural language as the specification of a latent reward function that completes the definition of an otherwise fully-specified MDP. We use a language grounding model to arrive at a more consolidated, semantic representation of that reward function, thereby completing the MDP and allowing it to be passed to an arbitrary planning algorithm for generating robot behavior. More specifically, we think of each natural language command as specifying some latent LTL formula encoding the desired behavior. The OO-MDP propositional functions serve as possible atoms of the LTL expressions, creating an expressive language for defining tasks. In particular, LTL formulae are sufficiently expressive to subsume semantic representations used in previous goal-based language grounding work.

Linear temporal logic has the following grammatical syntax: φ:=atom|¬φ|φ∧ψ|φ∨ψ|#φ|⋄φ|φUφ|φ

atom denotes an atomic proposition; ¬, ∧, and ∨ are logical “not”, “and”, and “or”; # denotes “always”, ⋄ denotes “eventually”, U denotes “until”, and denotes “next”.

In order to handle the task of translating from natural language to GLTL expressions, we turn to recent neural-network architectures for sequence learning that have already proven to be incredibly performant in other machine translation tasks. We are presented with a sequence taken from some source language x=[x₁, . . . , x_(N)] and would like to infer a corresponding sequence of some target language y=[y₁, . . . , y_(M)]. Given a translation model with parameters θ, we look to identify the most likely target sequence and decompose its corresponding probability into the product of partial translation probabilities:

$\begin{matrix} {{p\left( {\left. y \middle| x \right.,\theta} \right)} = {\prod\limits_{m = 1}^{M}\;{p\left( {\left. y_{m} \middle| x \right.,y_{< m},\theta} \right)}}} & (1) \end{matrix}$

where y<m=[y₁, . . . , y_(m-1)].

Treating the space of natural language commands as a source language and GLTL expressions as a target language, we collect a parallel corpus and optimize the neural-network architecture parameters θ. Specifically, we leverage a recurrent neural network (RNN) encoder-decoder framework.

Widely used across a variety of natural language tasks, RNNs are models that map sequential inputs to high-dimensional output spaces, using recurrent cells that maintain an internal or hidden-state representation of the sequence processed thus far. Neural sequence-to-sequence learning use two distinct RNN models, an encoder and decoder, to map between source and target language sequences. An encoder processes an input sequence and, for each input token, produces an output and an updated hidden state. While the hidden state stores a global summary of the overall sequence, the output encodes local information computed from the current hidden state and the current input token. After all input tokens are fed to the encoder, there is a resulting sequence of encoder outputs and hidden states. Subsequently, a decoder model generates target language sequences by mapping an input target language symbol to a probability distribution over the target language vocabulary. Connecting the two models is the final hidden state of the encoder RNN cell (that is, the hidden state after processing the entire input sequence) which is used to initialize the hidden state of the decoder RNN cell. The encoder hidden state is initialized with an all zeros vector and a special start token is fed as the first input to the decoder in order to initialize decoding.

In both the encoder and decoder of our system, we use the Gated Recurrent Unit (GRU) as the core RNN cell. Briefly, a GRU is one type of RNN cell that, using the previous hidden state s_(t-i) and current input x_(t), performs the following computations: Reset gate: r _(t)=σ(W _(r) ·x _(t) +U _(r) ·s _(t-1) +b _(r))  (2) Output: g _(t)=tan h(W _(g) ·x _(t) +U _(g)·(r _(t) ⊙s _(t-1))+b _(g))  (3) Update gate: z _(t)=σ(W _(z) ·x _(t) +U _(z) ·s _(t-1) +b _(z))  (4) State update: s _(t)=(1−x _(t))⊙s _(t-1) +z _(t) ⊙g _(t)  (5)

resulting in an output vector gt and a new hidden state s_(t) where (·) and ((·)) denote matrix-vector and Hadamard products respectively. Intuitively, r_(t) is a “reset” gate affecting how hidden state information is combined with the current input to produce the cell output, g_(t), and z_(t) is an “update” gate negotiating how much information is preserved within the hidden state. All parameters in bold denote trainable parameters of the cell that are optimized during training of the entire architecture via backpropagation.

Given the GRU encoder and decoder, f_(enc) and f_(dec), words of the input sequence are first mapped to their corresponding vector representations via an embedding lookup. Intuitively, since the individual tokens can simply be represented as integers, the word embeddings provide a high-dimensional representation that is optimized as part of the neural network and can be used to capture semantic information about each individual word. Feeding each input embedding, {circumflex over (x)}_(j), in sequence produces a corresponding sequence of encoder outputs, [h₁, . . . , h_(N)], and hidden states [s₁, . . . , s_(N)], where each h_(j), s₁ comes from: h _(j) ,s _(j) =f _(enc)(s _(j-1) ,{circumflex over (x)} _(j))  (6)

Once the input sequence has been processed, the final encoder hidden state, s_(N) is used to initialize the RNN cell of the decoder. During decoding, the previously inferred token of the output sequence is mapped to a probability distribution over the target vocabulary from which the next output token is sampled: p(y _(i) |x,y _(<m),θ)=f _(dec)(v _(i-1) ,ŷ _(i-1))  (7

Here denotes the embedding for the previously decoded token, ŷ_(i-1). We use a greedy decoding scheme and treat the token in the distribution with highest probability as the inferred token, ŷ_(i).

Subsequent work by Bandanau proposed learning a weighting or attention scheme to selectively utilize encoder output information during decoding. The resulting Bandanau attention mechanism reparameterizes the decoder as a function of the previous token embedding and a context vector. At each step of decoding, the context vector weights the information of the encoder outputs [h₁, . . . , h_(N)] according to:

$\begin{matrix} {c_{i} = {\sum\limits_{j = 1}^{N}{\alpha_{i,j}h_{j}}}} & (8) \end{matrix}$

where α_(i) is a weight on the information carried in h_(j). The individual attention weights are computed as outputs of a feedforward neural network, a(v_(i), [h₁, . . . , h_(N)]), with a final softmax activation and where v_(i) is the current hidden state of the decoder RNN cell. Accordingly, decoding occurs by greedily sampling the next token distribution: p(y _(i) |x,y _(<m),θ)=f _(dec)(v _(i-1) ,ŷ _(i-1) ,c _(i))  (9)

Even with alternatives to Bandanau attention, attention weights are typically computed as a function of the current decoder hidden state and the encoder outputs. Given the rigid structure of GLTL as a target output language, we examined an alternative attention mechanism that computes attention weights purely as a function of decoder parameters. More formally, we use an encoder-agnostic attention mechanism where each attention weight α_(i) is computed by a feedforward neural network a(ŷ_(i-1), v_(i)) that takes the previously decoded token embedding and the current decoder hidden state as inputs. This attention scheme captures the idea that the previously decoded token and current state of the target translation generated thus far offer a clearer signal for weighting the encoder outputs than the encoder outputs themselves. Although seemingly counterintuitive, we considered a particular scenario where the sequence-to-sequence grounding model must generalize to a language command at test time that corresponds to a novel GLTL expression never seen during training. Instead of being subject to the learned mechanics of the source language that may vary dramatically at test time, the encoder-agnostic attention scheme would maintain focus on the GLTL target language side that exhibits significantly less variation and follows a small, well-defined lexicon.

Unlike the architecture outlined in Bandanau, we found a single, forward RNN encoder was sufficient for our task and opted not to use a bi-directional RNN encoder in favor of reduced training time and sample complexity. All models were implemented in PyTorch and trained using the Adam optimizer with a learning rate of 0.001. Embedding and RNN output sizes were set to 50 and 256 units respectively. Additionally, we made use of dropout regularization before and after both the encoder and decoder GRUs with a keep probability of 0.8. We found that reversing all input sequences provided a small increase in grounding accuracy. For each training sample, a random choice was made between providing the ground truth output token, y, (teacher forcing) and providing the actual decoded symbol, ŷ, with 0.5 probability.

The following describes the two domains used for evaluating our approach as well as the details of our data collection procedure for training three presented grounding models.

Mobile Manipulation Robot Domain

Cleanup World includes a single robot agent acting within an environment characterized by distinctly colored rooms and movable objects. We chose this domain for our experiments as it allows us to express a wide variety of constrained execution tasks. For the purposes of our experiments, these restrictions took on one of two forms: the robot would need to reach it's target destination by either passing through or explicitly avoiding a particular room in the environment.

Pick-and-Place Domain

In order to showcase instances of repetitive robot execution, we designed a pick-and-place domain where a robot is meant to patrol the environment waiting for sudden events that trigger some desired behavior. More concretely, the domain is defined by distinct table and bin regions where colored blocks may reside. These blocks have only two attributes: first for location, table or bin; second for color where the blocks can be red or green or blue or yellow. Initially, there may not be any blocks present and so the robot must utilize a scan action to survey the area until an appropriately colored block can be picked up and moved from the table to the bin. A scan operation reveals a new block, if it was “placed” on the table. The placement can be assumed to be done by a human user. The pick-and-place action picks a block and moves it to the bin. Note that the reachable state space of this domain grows rapidly as the number of blocks on the table increases, as each block can be at different locations. Given an agent with only two scan and pick-and-place actions at its disposal, we experimented with two core task types: placing all blocks found during scanning into the bin or placing only blocks of a certain chosen color into the bin.

Data-Collection Procedure

We found that annotators were more inclined to specify positive over negative behavior in their instructions. For instance, an attempt to collect data for behavior matching the command “go to the green and avoid the yellow room” would often result in commands where users would instruct the robot to navigate to the green room utilizing whichever rooms were designated under the positively labeled images. Although technically correct, these instructions pose an obstacle as the intended, ground-truth GLTL expression (containing, for example, the token for the yellow room) would never include a symbol with semantic meaning associated with the rooms mentioned (for example, the blue or red rooms). In order to address this problem, a manual relabeling of data was performed such that samples whose instruction did not align to the intended GLTL formula were instead mapped to the corresponding GLTL formula consistent with the instruction. Filtering commands that reflected a clear misunderstanding of the annotation task resulted in parallel corpora consisting of 501 and 345 commands for the mobile-manipulation and patrol domains respectively. In aggregate, these commands reflected a total of 15 and 2 unique GLTL expressions respectively. Examples of natural language commands and their corresponding GLTL formulae can be seen in FIG. 2.

An Amazon Mechanical Turk (AMT) user study was conducted in order to collect data for training our neural sequence-to-sequence grounding models mapping natural language commands to GLTL expressions in each of our domains. To construct the parallel corpus, annotators were presented with static images (for Cleanup World) and short video clips (for pick-and-place) depicting a particular robot behavior. Users were then asked to provide a single sentence instruction that would induce the observed behavior. For the mobile-manipulation robot domain, sample images provided to AMT annotators can be seen in FIG. 1. Specifically, these images were displayed to users with positive (green arrow) and negative (red arrow) labels so that annotators could infer the constraint being placed on the robot's execution.

In order to supply additional data for the mobile-manipulation domain, we utilized a subset of the Cleanup World dataset consisting of 356 agent navigation and block manipulation commands, swapping their Markov reward function representation for the GLTL equivalent. Together, the combined dataset denotes the original dataset for the mobile manipulation domain used throughout all of our experiments. The pick-and-place domain original dataset received no extra commands. To further expand on the data present for learning across both domains, a synthetic data expansion procedure was applied to both datasets. Excluding the minority of commands pertaining to block manipulation behavior, all other commands were mapped to new commands through the substitution of color words in the natural language and the equivalent swapping of atoms in the corresponding GLTL expressions. For example, the command “move to the red room” and corresponding expression OR would be mapped to three new language commands (one for each of the blue, green and yellow rooms) along with the corresponding GLTL expressions (⋄B, ⋄G, ⋄Y). This expansion resulted in two expanded datasets for each of the domains consisting of 3382 and 745 commands respectively reflecting a total of 39 and 5 unique GLTL expressions.

Language Grounding

We conducted 5-fold cross validation experiments across three grounding models and present the language grounding accuracy means and standard deviations in the Table shown in FIG. 3. Results were averaged over 3 independent trials with distinct random seeds. For each instance, correctness was determined by comparing the complete, greedily-decoded GLTL formula to ground truth. Training was done using two independent parallel corpora, one for each of the domains outlined in above. Additionally, we reported results on both the original datasets, consisting of natural language commands exactly as collected through AMT, and the expanded datasets synthetically generated via the procedure described below. Notably, we find that all three models exhibit roughly identical performance despite the use of two different attention mechanisms. We suspect that the lack of an effect is due to the dramatically smaller vocabulary size of GLTL by comparison to traditional neural machine translation problems. However, we do find the use of an attention mechanism to have some effect on enabling generalization and the inference logical forms not seen during training.

In order to establish how well each grounding model captures the semantics of natural language and GLTL expressions, we conducted an experiment to assess the capacity for each model to infer novel GLTL expressions. Focusing on the mobile manipulation domain, we randomly sampled varying percentages of the 39 unique GLTL expressions represented across the collected within the expanded corpus of 3382 commands. All samples in the parallel corpus associated with the random sampled commands were used as training data while the entire remainder of the corpus was treated as a held-out test set consisting only of GLTL expressions not seen during training. The results of the experiment are shown in FIG. 4 with error bars denoting 95% confidence intervals computed over 10 independent trials. On average, we find that our encoder-agnostic attention scheme is slightly more adept at generalizing to novel commands. The results altogether, however, suggest that this type of generalization is still an open challenge for these models that traditionally excel in standard neural machine translation tasks that enjoy access to vast quantities of parallel training data. We believe that adapting these techniques to better operate in the extremely low resource area of robot language learning is an important direction for future research.

To demonstrate the efficacy of our approach, we translated our mobile-manipulation domain into the physical world with a TurtleBot agent. TurtleBot is a low-cost, personal robot kit with open source software. The problem space focused on constrained execution tasks requiring the robot the enter a goal room while either avoiding or passing through specific rooms. As in simulation, our physical setup consisted of four rooms uniquely identified by color and the agent's position in the world was tracked by a motion capture system. Using the Robot Operating System (ROS) speech to text API, we converted speech utterances to natural language text that could be passed to a trained instance of our grounding model with Bandanau attention, producing a GLTL formula. Treating the Cleanup World MDP as the environment MDP and identifying the specification MDP of the GLTL formula, we combined the two MDPs and apply a standard MDP planning algorithm to generate robot behavior in real time. The planning is real time as the formulae for these tasks are not very long and GLTL allows fast planning. The primitive north, south, east, west actions of the Cleanup Domain agent were converted into a series of low level ROS Twist messages using hand-written controllers.

In summary, we demonstrated an approach for mapping between English commands and LTL expressions through neural sequence-to-sequence learning models. We presented techiques for data augmentation and a novel attention mechanism that enables the system to map between novel English commands and novel LTL expressions not encountered at training time so long as the constituent LTL atoms have been previously observed. We demonstrated this approach within two domains for mobile-manipulation and pick-and-place tasks as well as on a physical robot.

It would be appreciated by those skilled in the art that various changes and modifications can be made to the illustrated embodiments without departing from the spirit of the present invention. All such modifications and changes are intended to be within the scope of the present invention except as limited by the scope of the appended claims. 

What is claimed is:
 1. A method comprising: enabling a robot to learn a mapping between English language commands and Linear Temporal Logic (LTL) expressions, wherein neural sequence-to-sequence learning models are employed to infer a LTL sequence corresponding to a given natural language command, wherein geometric LTL (GLTL) paired with a Markov Decision Process (MDP) is used to find policies corresponding to LTL expressions.
 2. The method of claim 1 wherein the Markov Decision Process is a five-tuple (S, A, R, T, γ) where S defines the robot state space, A specifies the actions available to the robot, R encodes the underlying task through numerical rewards defined for each state-action pair, T defines the probabilistic transition dynamics of the environment, and γ is a discount factor.
 3. The method of claim 2 wherein given the Markov Decision Process as input, a planning algorithm produces a policy that maps from states to robot actions.
 4. The method of claim 3 wherein each atomic proposition of a GLTL expression has an associated three-state MDP consisting of an initial, accepting, and rejecting state. 